/*
 * @Author: Salaing
 * @Date: 2024-07-16 19:25:19
 * @LastEditors: Salaing
 * @LastEditTime: 2024-09-04 00:04:16
 * @Description: file content
 */

import ajax from "../http.js"

// 获取部门列表getDepartmentList

//- 获取部门列表
export const getDepartmentList = (params) => {
    const reqParams = params.queryData ? params.queryData : {};
    delete params.queryData;
    return ajax.get('/department', { ...params, ...reqParams });
};

export const getDepartmentDetail = (params) => {
    return ajax.get(`/department/${params._id}`,);
};

export const addDepartment = (params) => {
    return ajax.post('/department', params);
};

export const updateDepartment = (params) => {
    return ajax.put(`/department/${params._id}`, params);
};